package com.hjs.tools;

/**
 * @author flamemaster
 * @date 2020/6/16
 **/
public class asphalt {
    public static double all(int id, double length, double width) {
        if (id == 1 || id == 14) {
            return c1(length);
        } else if (id == 18 || id == 23 || id == 25) {
            return c3(length);
        } else {
            return c2(length, width);
        }
    }

    //    适用1,14
    public static double c1(double length) {
        return 0.2 * length;
    }

    //    适用2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,19,20,21,22,24,26,27
    public static double c2(double length, double width) {
        return length * width;
    }

    //    适用于18，23，25，长度
    public static double c3(double length) {
        return length;
    }
}
